import request from '@/utils/request'
export default {
  //分页查询
  getPageList(page, limit, searchObj) {
    return request({
      url: '/admin/itemType/list/' + page + '/' + limit,
      method: 'get',
      params: searchObj
    })
  },
  //删除ItemType
  removeById(id) {
    return request({
      url: '/admin/itemType/remove/' + id,
      method: 'delete'
    })
  },
  //新增ItemType等级
  save(itemType) {
    return request({
      url: '/admin/itemType/save',
      method: 'post',
      data: itemType
    })
  },
  //根据id查询ItemType
  getById(id) {
    return request({
      url: '/admin/itemType/' + id,
      method: 'get'
    })
  },
  //修改ItemType
  updateById(itemType) {
    return request({
      url: '/admin/itemType/update',
      method: 'put',
      data: itemType
    })
  },
  //查询所有商品类别
  list() {
    return request({
      url: '/admin/itemType/list',
      method: 'get'
    })
  }
}
